//
//  NSArray+mutableDeepCopy.m
//  SPDataCenter
//
//  Created by Hubery on 16/1/11.
//  Copyright © 2016年 Whx. All rights reserved.
//

#import "NSArray+mutableDeepCopy.h"

@implementation NSArray (mutableDeepCopy)
-(NSMutableArray*)mutableDeepCopy
{
    NSMutableArray* mutableArray = [self mutableCopy];

    for (int i=0;i<[self count];i++)
    {
        id instance = [self objectAtIndex:i];
        if([instance respondsToSelector:@selector(mutableDeepCopy)])
        {
            [mutableArray replaceObjectAtIndex:i withObject:[instance mutableDeepCopy]];
        }
    }

    return mutableArray;
}
@end
